﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ParsecParser.Display
{
    public class NestedAbilityDisplayItem : AbilityDisplayItem
    {
        public List<AbilityDisplayItem> Abilities { get; set; }
        public Dictionary<string, int> DamageByType { get; set; }
        public string DamageTypeString
        {
            get
            {
                return string.Join(Environment.NewLine, DamageByType.Select(x => x.Key + ": " + x.Value.ToString("N0") + " (" + ((double)x.Value / (double)this.Total).ToString("P1") + ")").ToArray());
            }
        }
        public NestedAbilityDisplayItem() : base()
        {
            DamageByType = new Dictionary<string, int>();
        }
    }
}
